<?php

namespace App\Http\Controllers;

use App\Service\ConfigsService;
use App\Validation\HotSearchValidation;


class ConfigsController extends BaseController
{

	public function searchAction()
	{		
		$raw = $this->validation(new HotSearchValidation, $this->request->getJsonRawBody());
		$data = ConfigsService::getVal($raw);

		$assign = [
			'list'  => $data
		];
		return $this->echoJson($assign);
	}

	public function valAction()
	{
		$raw = $this->validation(new HotSearchValidation, $this->request->getJsonRawBody());
		$data = ConfigsService::getVal($raw);
		return $this->echoJson($data);
	}
}